package com.micai.springboot.model;

import com.baomidou.mybatisplus.annotations.TableField;

/**
 * @Auther: zhaoxinguo
 * @Date: 2018/9/28 18:04
 * @Description:
 */
public class SmsModel {

    /**
     * 手机号码
     */
    private String phoneNo;
    /**
     * 短信验证码
     */
    private String smsCode;
    /**
     * 短信验证码过期时间
     */
    private Long smsCodeExpiration;
    /**
     * 短信验证码重发时间
     */
    private Long smsCodeResendingTime;
    /**
     * 图片验证码
     */
    private String imageCode;
    /**
     * 图片验证码过期时间
     */
    private Long imageCodeExpiration;
    /**
     * 已发次数
     */
    private int sendingCount = 0;
    /**
     * 已验次数
     */
    private int verifyingCount = 0;
    /**
     * 业务标志
     */
    @TableField("flag")
    private String flag;

    public String getPhoneNo() {
        return phoneNo;
    }

    public void setPhoneNo(String phoneNo) {
        this.phoneNo = phoneNo;
    }

    public String getSmsCode() {
        return smsCode;
    }

    public void setSmsCode(String smsCode) {
        this.smsCode = smsCode;
    }

    public Long getSmsCodeExpiration() {
        return smsCodeExpiration;
    }

    public void setSmsCodeExpiration(Long smsCodeExpiration) {
        this.smsCodeExpiration = smsCodeExpiration;
    }

    public Long getSmsCodeResendingTime() {
        return smsCodeResendingTime;
    }

    public void setSmsCodeResendingTime(Long smsCodeResendingTime) {
        this.smsCodeResendingTime = smsCodeResendingTime;
    }

    public String getImageCode() {
        return imageCode;
    }

    public void setImageCode(String imageCode) {
        this.imageCode = imageCode;
    }

    public Long getImageCodeExpiration() {
        return imageCodeExpiration;
    }

    public void setImageCodeExpiration(Long imageCodeExpiration) {
        this.imageCodeExpiration = imageCodeExpiration;
    }

    public int getSendingCount() {
        return sendingCount;
    }

    public void setSendingCount(int sendingCount) {
        this.sendingCount = sendingCount;
    }

    public int getVerifyingCount() {
        return verifyingCount;
    }

    public void setVerifyingCount(int verifyingCount) {
        this.verifyingCount = verifyingCount;
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public String id() {

        return this.flag + "::" + this.phoneNo;
    }

    public static String id(String phoneNo, String flag) {

        return flag + "::" + phoneNo;
    }
}
